<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Identifies an image and fetches attributes</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="imagick.identifyformat.html">« Imagick::identifyFormat</a></li>
      <li style="float: right;"><a href="imagick.implodeimage.html">Imagick::implodeImage »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.imagick.html">Imagick</a></li>
    <li>Identifies an image and fetches attributes</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="imagick.identifyimage" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::identifyImage</h1>
  <p class="verinfo">(PECL imagick 2, PECL imagick 3)</p><p class="refpurpose"><span class="refname">Imagick::identifyImage</span> &mdash; <span class="dc-title">Identifies an image and fetches attributes</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagick.identifyimage-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Imagick::identifyImage</strong></span>(<span class="methodparam"><span class="type">bool</span> <code class="parameter">$appendRawOutput</code><span class="initializer"> = <strong><code>false</code></strong></span></span>): <span class="type">array</span></div>

  <p class="para rdfs-comment">
   Identifies an image and returns the attributes.  Attributes include
   the image width, height, size, and others.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.identifyimage-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">appendRawOutput</code></dt>

     <dd>

      <p class="para">
         If <strong><code>true</code></strong> then the raw output is appended to the array.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-imagick.identifyimage-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Identifies an image and returns the attributes.  Attributes include
   the image width, height, size, and others.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-imagick.identifyimage-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   错误时抛出 ImagickException。
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-imagick.identifyimage-examples">
  <p class="para">
   <div class="example" id="example-2788">
   <p><strong>示例 #1 Example Result Format</strong></p>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Array
(
    [imageName] =&gt; /some/path/image.jpg
    [format] =&gt; JPEG (Joint Photographic Experts Group JFIF format)
    [geometry] =&gt; Array
        (
            [width] =&gt; 90
            [height] =&gt; 90
        )

    [type] =&gt; TrueColor
    [colorSpace] =&gt; RGB
    [resolution] =&gt; Array
        (
            [x] =&gt; 300
            [y] =&gt; 300
        )

    [units] =&gt; PixelsPerInch
    [fileSize] =&gt; 1.88672kb
    [compression] =&gt; JPEG
    [signature] =&gt; 9a6dc8f604f97d0d691c0286176ddf992e188f0bebba98494b2146ee2d7118da
)</pre>
</div>
   </div>
   </div>
   </p>
 </div>


</div></div></div></body></html>